package com.xltt.watchclient.module.bean;

import com.google.gson.Gson;

import java.util.List;
import java.util.Map;

public class OptResult {
    public boolean isSuccess;
    public int code;
    public int type;
    public String message;
    public String deviceName;
    public Map<String,String> deviceNames;

    public boolean isSuccess() {
        return isSuccess;
    }

    public void setSuccess(boolean success) {
        isSuccess = success;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public Map<String, String> getDeviceNames() {
        return deviceNames;
    }

    public void setDeviceNames(Map<String, String> deviceNames) {
        this.deviceNames = deviceNames;
    }

    public static OptResult fromJson(String json) {
        return new Gson().fromJson(json, OptResult.class);
    }

    public String toJson() {
        return new Gson().toJson(this);
    }
}
